

//
//  PayModel.m
//  ZQLearn
//
//  Created by macfeel on 2019/5/20.
//  Copyright © 2019 macfeel. All rights reserved.
//

#import "PayModel.h"
#import "WXApi.h"


@implementation PayModel

///防止后台返回的字段不对应或多或少    引起的crash
-(void)setValue:(id)value forUndefinedKey:(nonnull NSString *)key{
    
    
}



//微信支付
+(void)wxPay:(PayModel *)model{
    
    PayReq *request = [[PayReq alloc] init];
    ///共有6个参数，还有appid
    request.partnerId = model.partnerid;
    request.package = model.package;
    request.prepayId = model.prepayid;
    request.nonceStr = model.noncestr;
    request.timeStamp = [model.timestamp intValue];
    request.sign = model.sign;
    [WXApi sendReq:request];
}
@end
